import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'

// https://vite.dev/config/
export default defineConfig({
  base: process.env.NODE_ENV === 'production' ? '/dashboard/' : '/',
  plugins: [vue()],
  server: {
    proxy: {
      '/api': {
        target: 'http://10.21.224.198:8080',
        changeOrigin: true,
        // rewrite: path => path.replace(/^\/api/, '')
      }
    }
  },
})
